import axios from '@/utils/request';

export class loginApi {
  // 发送验证码
  static sendCode(mobile: string): Promise<any> {
    return axios.post('/api/member/member/sendCode', {
      mobile,
    });
  }
  // 登录
  static login(mobile: string, code: string): Promise<any> {
    return axios.post('/api/member/member/login', {
      mobile,
      code,
    });
  }
  // 获取图片验证码
  static getPhotoCode(mobile: string): Promise<any> {
    return axios.get('/api/member/member/getPhotoCode', {
      params: {
        mobile,
      },
    });
  }
  // 判断图形验证码
  static judgePhotoCode(mobile: string, photoCode: string): Promise<any> {
    return axios.post('/api/member/member/judgePhotoCode', {
      mobile,
      photoCode,
    });
  }
}
